package odontologico.entidad.base;

import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @author lverbel
 * @mail lev407@gmail.com
 * @fecha 21/02/2014
 */
@MappedSuperclass
@Inheritance(strategy = InheritanceType.JOINED)
public class ObjetoPersistente {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    protected Long id;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "fechaCreacion", nullable = false)
    private Calendar fechaCreacion;
    private boolean delMark;

    public boolean isDelMark() {
		return delMark;
	}

	public void setDelMark(boolean delMark) {
		this.delMark = delMark;
	}

	public void setFechaCreacion(Calendar fechaCreacion) {
		this.fechaCreacion = fechaCreacion;
	}

	protected ObjetoPersistente() {
        super();
        this.fechaCreacion = Calendar.getInstance();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Calendar getFechaCreacion() {
        return fechaCreacion;
    }
    
    

}
